const Koa = require("koa");
const bodyParser = require("koa-bodyparser");
const nlRouter = require("./router/index");

const port = 9527;
const app = new Koa();

app.use(bodyParser());

app.use((ctx, next) => {
  next();
});

app.use(nlRouter.routes());
app.use(nlRouter.allowedMethods());

app.listen(port, () => {
  console.log(`Http 服务启动成功, port: ${port}`);
});
